/**
  ******************************************************************************
  * Copyright (C) 2020 - ~, SCUT-RobotLab Development Team
  * @file    state_Passive.h
  * @author  Mentos Seetoo
  * @brief   Finite State Machine for waiting command.
  * @note    
  * @warning 
  *     - At least C++11 is required.														 
  ******************************************************************************
  */
#ifndef _FSM_PASSIVE_H
#define _FSM_PASSIVE_H
/* Includes ------------------------------------------------------------------*/
#include "FSM.h"
/* Types define --------------------------------------------------------------*/
namespace Quadruped
{
/**
 * @brief Class for passive state.
 * 
 */
template <typename T>
class FSM_Passive : public FSM_Base<T>
{
public:
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
    FSM_Passive(GaitScheduler<T> *p_gait,
                StateEstimator<T> *p_estimator,
                DesiredCoMState<T> *p_command,
                Dynamic<T> *p_dynamic,
                T run_period);
    void RunState();
    int Transition(FSM_Base<T>* target_state);
private:
    int _cnt;
    Dynamic<T>*  p_Dynamic;
    DesiredCoMState<T>* p_CoMCommand;
    StateEstimator<T>*  p_StateEstimator;   
    GaitScheduler<T>*   p_GaitScheduler;
};

} // namespace Quadruped
#endif
  /************************ COPYRIGHT(C) SCUT-ROBOTLAB **************************/